package com.freecycle.sg.http;

import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;

import android.text.format.DateUtils;

public class HTTPUtils {
	
	public static DefaultHttpClient createHttpClient() {
		final HttpParams params = new BasicHttpParams();

		HttpConnectionParams.setConnectionTimeout(params, (int) (10 * DateUtils.SECOND_IN_MILLIS));
		HttpConnectionParams.setSoTimeout(params, (int) (10 * DateUtils.SECOND_IN_MILLIS));
		HttpConnectionParams.setSocketBufferSize(params, 8192);

		DefaultHttpClient client = new DefaultHttpClient(params);

		return client;
	}
	
}
